<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>B2B电商平台.通知中心</title>
		<%@ include file="/pages/mainPage/header.jsp" %>
		<style type="text/css">
.table tr td {
	border-left: 1px solid #ddd;
	border-bottom: 1px solid #ddd;
	height: 33px;
}

.table tr th {
	border-left: 1px solid #ddd;
	font-weight: bold;
}
em.create {
    background-position: -50px -44px;
    line-height: 28px;
    display: inline-block;
    font-style: normal;
    background-repeat: no-repeat;
    text-indent: 15px;
    float: right;
    cursor: pointer;
}
.create {
	background: url("<%=path%>/images/coupons/sort_zss.png");
}

#queryId button{
	background-image: url("<%=path%>/include/css/img/xs_bgx.png");
    background-color: transparent;
}
.cxx_btn{
	width: 44px;
    height: 24px;
    background-position: 0px -203px;
    line-height: 24px;
    margin: 0px 0px 0px 5px;
}
a{
	color: #039;
}
#tbody td{
padding: 0px 4px;
vertical-align: middle;
line-height:33px;
}
.search_lis_se input{
height: 24px;
}
button{
	background-image: url(<%=path%>/include/css/img/xs_bgx.png);
    background-color: transparent;
}
</style>
		<script type="text/javascript">
	$(function(){
		_search();
	});

	var pagination;
	function _search() {
		var url = "<%=path%>/tips/queryTipsListPage.do";
		var data = {
		};
		pagination = _initPagination({'pageId':'pagination', 'cKey':'queryTipsListPage', 'url': url, 'data': data, 'rows': 10, 'callback':_initDataList});
	}
	
	function _initDataList(data) {
	 	var tpl = $('#dataTpl').html();
		$('#tbody').html(doT.template(tpl)(data.rows));
		_reHeight("rightFrame","contentDiv");
	}	

	function _readTips(uuid){
		$.ajax({
			type:"post",
			url: "<%=path%>/tips/readTips.do",
			data:{
				tipIds : uuid
			},
			dataType:"json",
			success:function(data){
				if(data.success){
					$("#"+uuid+" td").css("font-weight","normal");
					$("#"+uuid+" td textarea ").css("font-weight","normal");
					$("#"+uuid+" td img ").hide();
				}
				//_search();
			}
		});
	}
</script>
	</head>

	<body style="font-family: '微软雅黑';">
		<div id="contentDiv" style="padding:4px; width:99%;">
			<div class="colnums-2-ab-b">
				<div class="toptil">通知中心 <div style="float: right;margin: 5px 40px 0px 0px;"></div></div>
				<div></div>
				<div class="row-fluid dataTables_wrapper" >
					<table id="listTable"
						class="table table-hover table-nomargin table-bordered usertable dataTable"
						style="width: 100%; border-spacing: 0;">
						<thead>
							<tr class="trBgd"
								style="background-color: #eee;text-align: center; height: 31px; border: 1px solid #ddd; white-space: nowrap; background-position: 0 -123px; line-height: 30px; font-weight: bold;">
								<th width="5%">
									序号
								</th>
								<th width="30%">
									通知标题
								</th>
								<th width="55%">
									通知内容
								</th>
								<th width="10%">
									通知日期
								</th>
							</tr>
						</thead>
						<tbody id="tbody" style="font-size: 13px">
						</tbody>
					</table>
					<div class="dataTables_paginate paging_full_numbers">
						<span id="innerHtml"> </span>
					</div>
					<div id="pagination"></div>
					<div>
						<div style="height: 30px;"></div>
						<!-- 分类列表div结束 -->
						<div class="clear"></div>
					</div>
				</div>
				</div>
			</div>
	</body>
	<script type="text/javascript">
	$(document).ready(function(){
			_reHeight("rightFrame","contentDiv");
			
	 });
</script>
	<script id="dataTpl" type="text/template">
		{{ for (var i = 0; i < it.length; i ++) { }}  
		{{     var row = it[i]; }}
		{{     var rowNumber = _getRowNumber(i); }}
		{{     var readStatus = row.READ_STATUS; }}
		{{     var fontWeight = 'normal'; }}
		{{     if(readStatus=='0'){ }}
		{{     	  fontWeight='800'; }}
			<tr style='line-height: 30px;cursor: hand;' id='{{=row.UUID}}' onclick="_readTips('{{=row.UUID}}')">
		{{     } else { }}
			<tr style='line-height: 30px;'  >
		{{     }  }}
				<td style='width: 5%;text-align:center;font-weight:{{=fontWeight}}'>{{=(rowNumber)}}</td>
				<td style='width: 30%;font-weight:{{=fontWeight}}'>{{=row.TIP_TITLE}}
		{{     if(readStatus=='0'){ }}
				<img src="<%=path%>/include/images/new.png" style="width:26px;height:15px;vertical-align:top;"/>
		{{ 	   }  }}		
				</td>
				<td style='width: 55%;text-align:center;padding:5px 0 5px 0;font-weight:{{=fontWeight}}' title='{{=row.TIP_CONTENT}}'><textarea readonly style="font-weight:{{=fontWeight}};width:98%;height:80px;">{{=row.TIP_CONTENT}}</textarea></td>
				<td style='width: 10%;text-align:center;font-weight:{{=fontWeight}}'>{{=row.TIP_DATE}}</td>
		     </tr>
		{{ } }}
	</script>
</html>
